package com.lemon.components.video.enums;

public enum H264Preset {

	ultrafast("ultrafast", "极端的快"),
	superfast("superfast", "超级的快"),
	veryfast("veryfast", "非常的快"),
	faster("faster", "比较的快"),
	fast("fast", "快"),
	medium("medium", "一般"),
	slow("slow", "慢"),
	slower("slower", "比较的慢"),
	veryslow("veryslow", "非常的慢"),
	placebo("placebo", "最慢");

	private String code;
	private String message;

	public static H264Preset getEnumByMessage(String message) {
		if (message == null)
			return null;
		for (H264Preset _enum : values()) {
			if (_enum.getMessage().equalsIgnoreCase(message)) {
				return _enum;
			}
		}
		return null;
	}

	/**
	 * 获取全部枚举
	 * 
	 * @return List<H264Preset>
	 */
	public static java.util.List<H264Preset> getAllEnum() {
		java.util.List<H264Preset> list = new java.util.ArrayList<H264Preset>(values().length);
		for (H264Preset _enum : values()) {
			list.add(_enum);
		}
		return list;
	}

	/**
	 * 获取全部枚举值
	 * 
	 * @return List<String>
	 */
	public static java.util.List<String> getAllEnumCode() {
		java.util.List<String> list = new java.util.ArrayList<String>(values().length);
		for (H264Preset _enum : values()) {
			list.add(_enum.getCode());
		}
		return list;
	}

	private H264Preset(String code, String message) {
		this.code = code;
		this.message = message;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}
